import Vue from "vue";
import App from "./App.vue";
import router from "./router";
import store from "./store";

// 第三方插件
import "default-passive-events";
import MaterialKit from "./plugins/material-kit"; // vue-material-kit
import Vconsole from "vconsole";
import VueQr from "vue-qr";
// let vConsole = new Vconsole();
// Vue.use(vConsole);
import {
  Carousel,
  CarouselItem,
  Drawer,
  MessageBox,
  Select,
  Option,
  Button,
  Table,
  TableColumn,
  Input,
  Tabs,
  TabPane,
  Message,
  Dialog,
  Tooltip,
  Link,
  Form,
  FormItem,
  Dropdown,
  DropdownItem,
  DropdownMenu,
  Pagination,
  Divider,
  Radio,
  Badge as eBadge,
} from "element-ui"; // element-ui
import "element-ui/lib/theme-chalk/index.css"; // element-ui
Message.install = function(Vue, options) {
  Vue.prototype.$message = Message;
};
Vue.use(Radio);
Vue.use(Message);
Vue.use(Tooltip);
Vue.use(Link);
Vue.use(Form);
Vue.use(FormItem);
Vue.use(Dropdown);
Vue.use(DropdownItem);
Vue.use(DropdownMenu);
Vue.use(Pagination);
Vue.use(Divider);
Vue.use(Pagination);
Vue.use(eBadge);
import {
  Swipe,
  SwipeItem,
  Lazyload,
  List,
  PullRefresh,
  Field,
  Notify,
  Loading,
  Uploader,
  Toast,
  Cell,
  Dialog as vDialog,
  Form as vForm,
  Field as vField,
  CellGroup,
  Button as vButton,
  PasswordInput,
  NumberKeyboard,
  Badge,
  Popup,
  Collapse,
  CollapseItem,
  ActionSheet,
  Picker,
  DropdownMenu as vDropdownMenu,
  DropdownItem as vDropdownItem,
  Switch,
  Cascader,
  Area
} from "vant";
Vue.use(Swipe);
Vue.use(SwipeItem);
Vue.use(Lazyload);
Vue.use(List);
Vue.use(PullRefresh);
Vue.use(Field);
Vue.use(Notify);
Vue.use(Loading);
Vue.use(Uploader);
Vue.use(Toast);
Vue.use(Cell);
Vue.use(vDialog);
Vue.use(vForm);
Vue.use(vField);
Vue.use(CellGroup);
Vue.use(vButton);
Vue.use(PasswordInput);
Vue.use(NumberKeyboard);
Vue.use(Badge);
Vue.use(Popup);
Vue.use(Collapse);
Vue.use(CollapseItem);
Vue.use(ActionSheet);
Vue.use(Picker);
Vue.use(vDropdownMenu);
Vue.use(vDropdownItem);
Vue.use(Switch);
Vue.use(Cascader);
Vue.use(Area);
import "vant/lib/index.css";

import Vuelidate from "vuelidate"; // vuelidate

Vue.use(MaterialKit);
Vue.use(Carousel);
Vue.use(CarouselItem);
Vue.use(Drawer);
Vue.use(Select);
Vue.use(Option);
Vue.use(Button);
Vue.use(Table);
Vue.use(TableColumn);
Vue.use(Input);
Vue.use(Tabs);
Vue.use(TabPane);
Vue.use(Dialog);

Vue.use(Vuelidate);
import { watchlocalstorage } from "./utils";
Vue.use(watchlocalstorage);
Vue.config.productionTip = false;
Vue.prototype.$confirm = MessageBox.confirm;
import VueClipboard from "vue-clipboard2";
VueClipboard.config.autoSetContainer = true;
Vue.use(VueClipboard);

new Vue({
  store,
  router,
  beforeCreate() {
    Vue.prototype.$bus = this; //全局事件总线
  },
  render: h => h(App),
}).$mount("#app");
